package cn.com.xcf.service;

import cn.com.xcf.dao.model.TCheckCost;
import cn.com.xcf.dao.model.TCheckCostExample;
import cn.com.xcf.service.base.BaseService;
import com.xcf.entity.Page;
import com.xcf.util.PageData;

import java.util.List;
import java.util.Map;

/**
 * TCheckCostService接口
 * 成本对账单服务
 *
 * @author WongBin
 * @date 2017/12/06
 */
public interface CheckCostService extends BaseService<TCheckCost, TCheckCostExample> {

    /**
     * 获取待核对账单列表
     * @param param
     * @param addition
     * @param page
     * @return
     */
    List getCheckUndoList(Object param, Map addition, Page page);

    /**
     * 查询对账记录
     * @param item
     * @param addition
     * @param page
     * @return
     */
    List getCheckList(TCheckCost item, Map addition, Page page);

    /***
     * 修改对账单
     * @param checkId
     * @param undoList
     * @throws Exception
     */
    void addToCheckList(Object checkId, List undoList, Object operator,String currStatus)throws Exception;

    /***
     * 生成对账单
     * @param uncheckIds
     * @throws Exception
     */
    void genCheckRecord(List uncheckIds, Object operator,Map param)throws Exception;

    /**
     * 取消对账单
     * @param checkId
     * @throws Exception
     */
    void cancelRecord(Object checkId, Object operator)throws Exception;
    /**
     * 付款审请打标记
     * @throws Exception
     */
    void updatePayRecordFlag(Object checkId, String id,String name) throws Exception;
 
    /**
     * 撤销对账
     * @param checkId
     * @param detailIds
     * @throws Exception
     */
    void invalidCheckRecordDetails(Object checkId, List detailIds, Object operator)throws Exception;

    List listItemsByCheckId(Object checkId);


    boolean resetItemStatus(Object checkCode,List detailIs,String status, String currStatus);
    /***
     * 导出待对账明细
     * @param params
     * @return
     */
    List exportUndoList(Map params);

    /***
     * 导出对账单
     * @param params
     * @return
     */
    List exportCheckList(Map params);

    enum CheckCostStatus{
        CREATE(1),CANCEL(0),APPEND(1),UNDOITEM(0);

        int flag;
        private CheckCostStatus(int v){
            flag = v;
        }
        public int getFlag(){
            return flag;
        }
    }
    enum CheckCostDetailStatus{
        CREATE(1),CANCEL(0),PRE_CONFIRM(2);

        int flag;
        private CheckCostDetailStatus(int v){
            flag = v;
        }
        public String getFlag(){
            return ""+flag;
        }
    }
    //查找
	List<Map> serCostBill(String Exportcostbill);

	//查询部门
	PageData findInfo(PageData pd);

	//发票号为空的情况下
	List<Map> serCost(String Exportcostbill);
	
	
	
	
	
}